﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LuKou.Shopspace.Domains;
using LuKou.Shopspace.Services;

namespace LuKou.Web.BLL.Service
{
    public class GoodsSearchService
    {
        private static IGoodsSearchSvr _svr;
        static GoodsSearchService()
        {
            _svr = ServiceHelper.Get<IGoodsSearchSvr>("IGoodsSearchSvr");
        }
        public static List<Goods> GetGoodsList(string keyWord, long categoryID, List<GoodsAttrib> attribs, string orderBy, int skipResults, int maxResults)
        {
            if (null == attribs)
            {
                attribs = new List<GoodsAttrib>();
            }
            return _svr.ShearchGoodsList(keyWord, categoryID, attribs, orderBy, skipResults, maxResults);
        }

        public static int GetGoodsCount(string keyWord, long categoryID, List<GoodsAttrib> attribs)
        {
            if (null == attribs)
            {
                attribs = new List<GoodsAttrib>();
            }
            return _svr.ShearchGoodsCount(keyWord, categoryID, attribs);
        }
    }
}
